﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zy.WPF.CtrLib.Enums;

/* ==============================================================================
   * 功能描述：ZyDialogModel  
   * 创 建 者：Administrator
   * 创建日期：2022-03-31 14:42:37
   * ==============================================================================*/
namespace Zy.WPF.CtrLib.ViewModels
{
    public class ZyDialogModel : ZyViewModelBase
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="_message">消息</param>
        /// <param name="_title">标题</param>
        /// <param name="_type">类型</param>
        /// <param name="_closeTime">自动关闭时间</param>
        public ZyDialogModel(string _message, string _title = "提示", ThemeTypeEnum _type = ThemeTypeEnum.Default, int _closeTime = 30)
        {
            Message = _message;
            Title = _title;
            Type = _type;
            CloseTime = _closeTime;
        }
        private string _message;
        private string _title;
        private ThemeTypeEnum _type;
        private int _closeTime;
        /// <summary>
        /// 消息
        /// </summary>
        public string Message
        {
            get { return _message; }
            set
            {
                _message = value;
                NotifyPropertyChanged("Message");
            }
        }
        /// <summary>
        /// 类型
        /// </summary>
        public ThemeTypeEnum Type
        {
            get
            {
                return _type;
            }
            set
            {
                _type = value;
                NotifyPropertyChanged("Type");
            }
        }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title
        {
            get { return _title; }
            set
            {
                _title = value;
                NotifyPropertyChanged("Title");
            }
        }
        /// <summary>
        /// 剩余自动关闭时间
        /// </summary>
        public int CloseTime
        {
            get { return _closeTime; }
            set
            {
                _closeTime = value;
                NotifyPropertyChanged("CloseTime");
            }
        }

       
    }
}
